package com.zhang.factory.abstract1;

public class Client {
    public static void main(String[] args) {

        System.out.println("===小米产品系列===");
        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();

        IphoneProduct iphoneProduct = xiaomiFactory.iphoneProduct();
        iphoneProduct.callup();
        iphoneProduct.shutdown();

        IRouterProduct iRouterProduct = xiaomiFactory.routerProduct();
        iRouterProduct.openWifi();

        System.out.println("===华为产品系列===");
        //小米工厂
        HuaweiFactory huaweiFactory = new HuaweiFactory();

        iphoneProduct = huaweiFactory.iphoneProduct();
        iphoneProduct.callup();
        iphoneProduct.shutdown();

        iRouterProduct = huaweiFactory.routerProduct();
        iRouterProduct.openWifi();

    }
}
